#define  _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main()
{
	int count = 0;
	int countHD = 0;
	int grade = 0;

	printf("Please enter students' grades: \n");
	scanf("%d", &grade);

	while (grade != -1)
	{
		count = count + 1;
		if (grade >= 80)
		{
			countHD = countHD + 1;
		}
	printf("Please enter students' grade: \n");
	scanf("%d", &grade);
	}
	printf("The number of students who get HD is %d and the rate of HD is %lf.", countHD, 1.0*countHD / count);

	return 0;

}